﻿<Window x:Class="XmlStudio.Dialogs.ApplicationExitDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:loc="clr-namespace:Tomers.WPF.Localization;assembly=Tomers.WPF.Localization" 
        loc:Translate.Uid="ApplicationExitDialog.WindowTitle"
        Title="{loc:Translate 'XmlStudio'}"
        MinWidth="360"
        WindowStartupLocation="CenterOwner"
        x:Name="ApplicationExitWindow"
        Style="{StaticResource XmlStudioDialogStyle}">
    <Border BorderBrush="Gray" BorderThickness="1" Margin="{StaticResource DialogBoxMargin}" Background="{StaticResource DialogBackgoundBrush}">
        <Grid Margin="{StaticResource DialogBoxMargin}" HorizontalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition MinHeight="46" />
                <RowDefinition Height="30*" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="46" />
                <ColumnDefinition Width="255" />
                <ColumnDefinition Width="46" />
            </Grid.ColumnDefinitions>

            <Image x:Name="warningImage" VerticalAlignment="Center" HorizontalAlignment="Center" Width="32" Height="32" />
            <TextBlock TextWrapping="Wrap" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Left" loc:Translate.Uid="ApplicationExitDialog.Question" 
                           Text="{loc:Translate 'Do you want to save changes you made to document?'}" Margin="0 7 0 7" />

            <StackPanel Grid.Row="1" Grid.Column="1"  Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="7 0 7 0">
                <Button loc:Translate.Uid="ApplicationExitDialog.SaveButton"    Width="{StaticResource ButtonWidth}" Height="{StaticResource ButtonHeight}" Content="{loc:Translate Save}" IsDefault="True" Click="OnYesClicked" Margin="0 7 7 0" />
                <Button loc:Translate.Uid="ApplicationExitDialog.DontSaveButton"     Width="{StaticResource ButtonWidth}" Height="{StaticResource ButtonHeight}" Content="{loc:Translate 'Don;t Save'}" Click="OnNoClicked" Margin="0 7 7 0" />
                <Button loc:Translate.Uid="ApplicationExitDialog.CancelButton" Width="{StaticResource ButtonWidth}" Height="{StaticResource ButtonHeight}" Content="{loc:Translate Cancel}" Click="OnCancelClicked"  IsCancel="True" Margin="0 7 0 0" />
            </StackPanel>
        </Grid>
    </Border>
</Window>
